
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;


public class Pizza extends JPanel{
	 public int iter=140;
	public String name;
	public String descriptions;
	
	public Pizza(int i,String _name, String _descriptions){
		this.iter=i;
		this.name=_name;
		this.descriptions=_descriptions;
		int h=154, w=600;
	setLayout(null);
	setVisible(true);
	
	ImageIcon avatar = new ImageIcon("src/icon.jpg");
	
	JLabel setAvatar = new JLabel(avatar);
	JLabel setName = new JLabel(name);
	final JLabel setDescriptions = new JLabel(descriptions);
	//next page to bedziew adapter do wyswietlania

	setAvatar.setBackground(Color.red);
	setAvatar.setOpaque(true);
	
	setName.setBackground(Color.blue);
	//setName.setOpaque(true);
	
	setDescriptions.setBackground(Color.green);
	setDescriptions.setOpaque(true);
	
	setName.setVisible(true);
	setDescriptions.setVisible(true);
	setAvatar.setVisible(true);
	setBounds(0  , iter, w, h);
	setName.setBounds(		10, 	15,		w, 		10);
	setAvatar.setBounds(	10, 	30, 	154, 	105);
	setDescriptions.setBounds(	170, 30, 	w-160,	101);

	add(setName);
			add(setAvatar);
					add(setDescriptions);
					System.out.println(setName.getBounds().toString()+
							setAvatar.getBounds().toString()+
							setDescriptions.getBounds().toString());
					
	}

	public String getName()
	{
		return name;
	}
	
	public String getDescriptions()
	{
		return descriptions;
		
	}
	
	public double getIter()
	{
		return iter;
	}
}
